#ifndef __MAP_PROTOCOL_H__
#define __MAP_PROTOCOL_H__

#include<string>
#include<vector>
#include"../Base/Serialize/SerialBuffer.hpp"

namespace SC_SUN
{

using namespace MMFSerialize;
 

/// 时序推动消息
extern const char* SC_TIME_MSG;
struct ScTimeMSG
{
    /*
    {
        "SLICE_IDX":xxxxxx
    }
    */
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScTimeMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScTimeMSG& val);

/// 场景信息查询
extern const char* SC_SCENE_MSG;
struct ScSceneMSG
{
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScSceneMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScSceneMSG& val);


/// 获取卫星列表
extern const char* SC_SATELLITE_LIST_MSG;
struct ScSatelliteListMSG
{
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScSatelliteListMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScSatelliteListMSG& val);

/// 卫星信息查询
extern const char* SC_SATELLITE_MSG;
struct ScSatelliteMSG
{
    /*
    {
        "SAT_SN":"xxxxxx"
    }
    */
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScSatelliteMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScSatelliteMSG& val);

/// GNSS查询
extern const char* SC_GNSS_MSG;
struct ScGnssMSG
{
    /*
    {
        "SAT_SN":"xxxxxx"
    }
    */
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScGnssMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScGnssMSG& val);

/// 卫星连接点查询
extern const char* SC_COLLECTION_MSG;
struct ScCollectionMSG
{
    /*
    {
        "SAT_SN":"xxxxxx"
    }
    */
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScCollectionMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScCollectionMSG& val);

/// 卫星星间信息查询
extern const char* SC_SEC_ISL_MSG;
struct ScSecIslMSG
{
    /*
    {
        "SEC_ISL_SAT1":"xxxxxx",
        "SEC_ISL_SAT2":"xxxxxx"
    }
    */
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScSecIslMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScSecIslMSG& val);

/// 获取场景列表
extern const char* SC_GET_SCENE_LIST_MSG;
struct ScGetSceneListMSG
{
    std::vector<std::string> scenes;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScGetSceneListMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScGetSceneListMSG& val);

extern const char* SC_GET_SCENE_LIST_MSG_JSON;
struct ScGetSceneListMSGJson
{
    std::string scenes;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScGetSceneListMSGJson& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScGetSceneListMSGJson& val);


/// 设置场景信息
extern const char* SC_SET_SCENE_MSG;
struct ScSetSceneMSG
{
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScSetSceneMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScSetSceneMSG& val);

/// 课题二数据相关接口
extern const char* SC_KETI2_INFO_MSG;
struct ScKeTi2InfoMSG
{
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScKeTi2InfoMSG& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScKeTi2InfoMSG& val);

//查询场景相关仿真时长，仿真步长
extern const char* SC_GET_SCENE_TIME_INFO_MSG;
struct SceneTimeInfoMsg
{
    double mSatStep;                        ///< 卫星数据步长
    double mGNSSTotal;                      ///< GNSS仿真总时长
    double mGNSSStep;                       ///< GNSS数据步长
    double mSecTotal;                       ///< 星间数据仿真总时长
    double mSecStep;                        ///< 星间数据仿真步长
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, SceneTimeInfoMsg& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const SceneTimeInfoMsg& val);
extern const char* SC_KETI2_INFO_MSG_JSON;
struct ScKeTi2InfoMSGJson
{
    std::string msg;
};
SerialOutBuffer& operator<<(SerialOutBuffer& buff, ScKeTi2InfoMSGJson& val);
SerialInBuffer& operator>>(SerialInBuffer& buff, const ScKeTi2InfoMSGJson& val);

}

#endif